﻿@{
    ViewBag.Title = "创建权限";
    IEnumerable<InfoSystem> infoSystems = ((IEnumerable<InfoSystem>)ViewBag.InfoSystems).OrderBy(x => x.Number);
    IDictionary<int, string> applicationTypeDescriptions = ViewBag.ApplicationTypeDescriptions;
}

@section header{
    <link type="text/css" href="~/css/Common/Form.css" rel="stylesheet" />
    <script type="text/javascript" src="~/scripts/Authority/Add.js"></script>
}

<div style="width: 100%; height: 100%; float:left; margin: 0;">
    <div class="easyui-panel" data-options="footer:'#footer'" style="width: 100%; height: 320px; padding: 10px;">
        <form id="frmCreateAuthority">
            <table id="tbAdd" style="margin: 0 auto;">
                <tr>
                    <td class="tdTitle">信息系统：</td>
                    <td class="tdContent">
                        <select class="easyui-combobox" id="cbxInfoSystem" name="infoSystemNo" data-options="required:true,editable:false" style="width: 210px">
                            <option value="" selected="selected"></option>
                            @foreach (InfoSystem infoSystem in infoSystems)
                            {
                                <option value="@infoSystem.Number">@infoSystem.Name</option>
                            }
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="tdTitle">应用程序类型：</td>
                    <td class="tdContent">
                        <select class="easyui-combobox" id="slApplicationType" name="applicationType" data-options="required:true,editable:false" style="width: 210px">
                            <option value="" selected="selected"></option>
                            @foreach (KeyValuePair<int, string> kv in applicationTypeDescriptions)
                            {
                                <option value="@kv.Key">@kv.Value</option>
                            }
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="tdTitle">权限名称：</td>
                    <td class="tdContent">
                        <input class="easyui-textbox" type="text" name="authorityName" data-options="required:true,width:210" />
                    </td>
                </tr>
                <tr>
                    <td class="tdTitle">权限路径：</td>
                    <td class="tdContent">
                        <input class="easyui-textbox" type="text" name="authorityPath" data-options="width:210" />
                    </td>
                </tr>
                <tr>
                    <td class="tdTitle">描述：</td>
                    <td class="tdContent">
                        <input class="easyui-textbox" type="text" name="description" data-options="multiline:true,width:210" style="height: 70px" />
                    </td>
                </tr>
            </table>
        </form>
    </div>
    <div id="footer" style="padding: 5px;">
        <div style="float: right;">
            <a href="#" onclick="createAuthority();" class="easyui-linkbutton c6" data-options="iconCls:'icon-ok'" style="width:90px">确定</a>
            <a href="#" onclick="javascript: $.easyuiExt.closeWindow();" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" style="width:90px">取消</a>
        </div>
    </div>
</div>
